home *** CD-ROM | disk | FTP | other *** search
- // Dave Wilson
- // 10-19-96 For Direct-To-SOM
-
- //==============================================
- #ifndef DTSFINANCE_HH
- #include "DTSFinance.hh" // DTSFinance
- #endif
-
- #include "som.xh" // somGetGlobalEnvironment
-
- #include <iostream.h> // for cout
-
- //==============================================
- void
- main()
- {
- double payment = 1000;
- short paymentsPerYear = 12;
- short compoundsPerYear = 4;
- double annualInterestPercent = 6.0;
- double years = 15;
- Environment* ev = somGetGlobalEnvironment();
- DTSFinance* f = new DTSFinance();
- double amountSaved = f->FutureValueWithPayments(ev,
- payment, paymentsPerYear, compoundsPerYear,
- annualInterestPercent, years);
- cout << "amount saved = " << amountSaved << endl;
- delete f;
- }